The following applications contain some common disclosure with that of the present application:
U.S. Patent Application entitled xe2x80x9cA System and Method for Storing and Accessing Data Representative of an Object in Various Levels-of-Detail,xe2x80x9d Ser. No. 08/749,287, filed Nov. 13, 1996, incorporated herein by reference; and
U.S. Patent Application entitled xe2x80x9cProviding a Framework for Level-of Detail Transformations,xe2x80x9d Ser. No. 08/749,275, filed Nov. 13, 1996, incorporated herein by reference.
1. Field of the Invention
The present invention relates generally to the field of graphics systems, and more particularly to a system and method for displaying an object in different levels of detail.
2. Related Art
Graphics systems are often used to display images of objects. A graphics system may store data representative of an object and display an image of the object using the stored data. Such a system may store several representations of an object, with each representation having a different level of detail (LOD). Data representations which have more detail are generally termed as finer LODs and data representations which have a lesser amount of detail may be termed as coarser LODs.
The amount of detail stored in different LOD representations may be appreciated by drawing an analogy to the detail perceived by an observer while observing an object. For example, very little detail may be perceived by an observer while watching an automobile from a distant aircraft. On the other hand, several details such as the doors, windows, mirrors will be perceived if the observer is standing sufficiently close to the automobile. A finer LOD may include such additional details also. Additional details generally provide xe2x80x98realismxe2x80x99 to the view of an object.
A graphics system may display an object using more than one LOD. A user may wish to display some portions of an object at one LOD while displaying other portions at another LOD, for example, to have realism in some portions, while conserving resources at portions which do not need realism.
What is therefore needed is providing a user the flexibility to display different portions of an object at different LODs.
The present invention is directed to a system and method for displaying different portions of an object in different levels of detail (LODs). An object is represented in a plurality of LODs. Each LOD includes one or more geometrical entities (e.g., edges, polygons). An embodiment in accordance with the present invention associates a data structure (for example, a tree) with the LOD representations of an object. The data structure specifies a relationship of each of the geometrical entities in an LOD to geometrical entities in different (i.e., finer and/or coarser) LODs. By using the relationships, an object may be displayed using multiple LODs.
To allow such display, one or more functions are provided with each geometrical entity (e.g., triangle) in the present invention. In one embodiment, a function is provided for each edge of the geometrical entity. In another embodiment, a single function is provided for the whole geometrical entity. The function corresponding to a geometrical entity is evaluated to generate at least one morph weight for the geometrical entity. A determination is made whether to replace one geometrical entity with another geometrical entity (or entities) at a different LOD according to the morph weights generated.
In one embodiment, a function may include several variables such as, for example, distance, light etc., with each variable being assigned a corresponding weight. Each variable has a value assigned to it. A variable may be assigned a different value before the evaluation of the corresponding function. A function is evaluated according to the values of the variables and the respective weights associated with the variables.
The morph weight generated from such an evaluation is used to determine whether to replace a geometrical entity in one LOD with geometrical entities in another LOD. Thus, depending on the definition of each function (i.e., variables and corresponding weights) and the values of the variables at the time of evaluation, different portions of the object may be displayed at different LODs.
The present invention ensures that no adjacent polygons are rendered with an LOD difference of more than a predetermined number (e.g., 1). In one embodiment of the present invention, a function is associated with each edge of a polygon. To ensure that no two adjacent polygons are rendered with an LOD difference of more than the predetermined number, the embodiment begins traversal of the data structure at the top (i.e., at coarsest level) and continues the traversal in a breadth-first fashion.
In another embodiment of the present invention, a function is associated with each polygon. The embodiment generates a proposed set of polygons to be rendered based on the morph weights generated for the corresponding polygons. That is, the polygons are recursively replaced by polygons at finer LOD so long as the function of each polygon returns a value of COMPLETE_MORPH. To ensure that no two adjacent polygons are rendered with a difference in LOD levels greater than a predetermined value (e.g., one), a polygon at the coarsest of resolution in the proposed set is selected. All polygons in the proposed set which have at least one shared edge with the selected polygon are then determined. If the difference of LOD levels of the selected polygon and any of the polygons with a shared edge is greater than 1, the polygon with the shared edge is deleted from the proposed set and the parent of the deleted polygon is added into the proposed set. The selected polygon and the parent polygons are both added to the proposed set and the above steps are performed recursively until there are no polygons with an LOD difference of more than one. The polygons remaining constitute a final set. The geometrical entities (polygons) in the final set are rendered to generate a display corresponding to the object.
One advantage of the invention is that it enables different portions of the object to be displayed at different LOD levels. In one embodiment, this is accomplished by providing one or more functions for each geometrical entity.
Another advantage of the present invention is that it ensures a smooth transition between the boundaries of portions which are rendered at different resolutions. In one embodiment, this is accomplished by ensuring that no adjacent polygons are rendered with an LOD difference of greater than one.
Yet another advantage of the present invention is that it minimizes the adverse impacts of the so-called xe2x80x9cT-verticesxe2x80x9d phenomenon. In one embodiment this is accomplished by subdividing a polygon having a T-vertex on one of its edges into two or more coplanar polygons.
Thus, the present invention enables a designer to define a data structure associated with different LOD representations of an object. By an appropriate selection of the variables and associated weights within a function, the designer may cause different portions of an object to be displayed at different LODs.